// dlg.txt

begintalkscript;

variables;

begintalknode 1;
	state = -1;
	nextstate = -1;
	condition = get_sdf(62,1) == 0;
	question = "special";
	text1 = "The fields south of Perikalia are covered with orchards. Fruit trees, specially modified by the Shapers, produce a bounty of fruit year round.";
	text2 = "However, the groves look poorly tended. Much of the fruit rots on the ground, the rapidly growing trees are expanding past their bounds, and large bands of soldiers patrol the roads.";
	text3 = "The Dera Reaches, a dry, arid province still supposedly under Shaper control, lies to the south. General Alwan has placed a lot of troops here to restrict traffic in and out of the Storm Plains.";
	action = SET_SDF 62 1 1;

begintalknode 2;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "__";

begintalknode 3;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "__";

begintalknode 4;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The creations in these pens have been properly cared for. They have been fed and are reasonably clean.";
	text2 = "However, the lack of Shapers and the constant rogue raids have left them extremely anxious. Unless a Shaper starts coming out to tend to them regularly, they will go rogue eventually. This sad end seems fairly likely.";

begintalknode 5;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The sign says:";
	text2 = "  THE BORDER BETWEEN THE STORM PLAINS AND THE DERA REACHES";
	text3 = "  IS CLOSED BY ORDER OF GENERAL ALWAN!";
	text4 = "  ANY WHO TRY TO PROCEED WITHOUT A PASS FROM STORMHOLD";
	text5 = "  WILL BE CONSIDERED A SPY!";


begintalknode 6;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The sign says:";
	text2 = "  CREATION KEEPER";
	
begintalknode 7;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The sign says:";
	text2 = "  Perikalia - North";
	text3 = "  Dera Reaches, Zephyr Oasis - Southeast";
	
begintalknode 8;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The sign says:";
	text2 = "  CREATION PENS";
	
begintalknode 10;
	state = -1;
	nextstate = 10;
	condition = 1;
	question = "Sergeant Phrynia";
	text1 = "A loyalist soldier walks down the road toward you. She seems surprised to see someone on this road who isn't wearing a uniform. She stops you.";
	text2 = "_Greetings, friend. I am Sergeant Phrynia. You may not be aware. General Alwan has sealed the border between here and the Dera Reaches. Without a written pass from Stormhold, you can't pass._";
	text3 = "_Keep going south from here, and the soldiers tend to attack on sight. I'd suggest heading back._";
	text5 = "Sergeant Phrynia walks by. _Ahhh ... You again._";
	text6 = "_I'm afraid I don't have time to chat. All I can say is that, if you go south, have a pass from Stormhold. And hold it out in front of you, so the guards can see it easily. Otherwise, you might get punctured._";
	action = INTRO;

begintalknode 11;
	state = 10;
	nextstate = -1;
	condition = has_spec_item(20) == 0;
	question = "I have papers from Shaper Rawal. A member of the Council. (Show them.)";
	text1 = "The sergeant doesn't even look at them. _If what you say is true, by law, you should be allowed to pass. But the patrols don't know the law, just what General Alwan says._";
	text2 = "_Those papers will not keep you safe from attack. You should turn back._";

begintalknode 12;
	state = 10;
	nextstate = -1;
	condition = has_spec_item(20) > 0 && gf(62,2) == 0;
	question = "I have a pass from Alwan's hand. (Show it.)";
	text1 = "Sergeant Phrynia bends down and looks at it. _Yes. This is real. It has the proper, crude scrawl. Many a forger has died because their fake pass was too neat._";
	text2 = "_If you go south, hold that out in front of you. The patrols might not attack you._";
	action = SET_SDF 62 2 1;

begintalknode 13;
	state = 10;
	nextstate = 11;
	condition = 1;
	question = "Why is the border sealed?";
	text1 = "_Because General Alwan says so. The Dera Reaches are Shaper territory, but overrun with the Unbound. And, from what I hear, corrupted with madness._";

begintalknode 14;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "Why are there Unbound there?";
	text1 = "_I don't know. I've heard rumors of how the rebels got the creatures past the Storm Plains. Traveling by dead of night. Tunnels. Boats. But they are there, and the Shaper down there hasn't been able to dislodge them._";
	text2 = "_Don't know why anyone would want to go down there. Dry, miserable, and Unbound too._";

begintalknode 15;
	state = 11;
	nextstate = 10;
	condition = 1;
	question = "Mad down there? In what way?";
	text1 = "She shakes her head. _I like a good rumor as much as anyone, but the things I've heard about the Dera Reaches are too much for even me to repeat._";
	text2 = "_I think I'd like to change the subject._";

begintalknode 16;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "Have there been any attacks on this road?";
	text1 = "_A few. Rogues try to slip up through the Dera Reaches sometimes. They want to get hold in the Storm Plains and breed._";
	text2 = "_Haven't had an attack in a while, but that could change any day._";

begintalknode 17;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "Thank you for your time.";
	text1 = "_And safe travels to you. If you are wise, you will go north. The guards to the south have strict orders. You won't be able to fast talk your way by._";
	text3 = "_And safe travels to you. Keep that pass of yours close to hand. The guards to the south have strict orders. Only that pass will save your life._";
	text4 = "She walks on toward Perikalia.";
	action = END_TALK;
	code =
		if (gf(62,2) == 0)
			rs(3);
			else rs(1);
	break;

//

begintalknode 30;
	state = -1;
	nextstate = 30;
	condition = 1;
	question = "Quirce";
	text1 = "There is a very large man sitting at this table, bandaging a wound on his arm. It looks like something with claws got a good shot in on him. He takes frequent swigs from a nearby bottle to dull the pain.";
	text2 = "He looks up at you and grimaces. _Hope you're allowed to be here. The guards have been very jumpy lately. I'm Quirce. The stable Keeper. Not having the best time of it, as you can see._";
	text3 = "He finishes applying the bandage. You note that the north side of the building is equipped to care for wounded creations. He must have borrowed supplies from there.";
	text5 = "Quirce continues to drink and stare unhappily at his arm. Occasionally, he prods at the wound with his good hand. He shouldn't be doing that.";
	action = INTRO;

begintalknode 31;
	state = 30;
	nextstate = 31;
	condition = 1;
	question = "What happened to your arm?";
	text1 = "_A roamer got a little nervous. Lunged at me. Not rogue, just scared. I calmed it down. No need to destroy it._";

begintalknode 32;
	state = 31;
	nextstate = -1;
	condition = 1;
	question = "Why was it scared?";
	text1 = "_Rogues sent by the rebels try to slip through here sometimes. Rogue creations make loyal creations nervous. Makes them more likely to go rogue. Being rogue is an infection._";
	text2 = "_I think that's why Shapers kill rogues so quickly, instead of trying to control them._";

begintalknode 33;
	state = 31;
	nextstate = -1;
	condition = 1;
	question = "How did you calm it down?";
	text1 = "_A whip. Harsh, I know. But I had to do something or it would've had my arm off._";

begintalknode 34;
	state = 30;
	nextstate = 32;
	condition = 1;
	question = "Why are the guards so jumpy?";
	text1 = "_Rogue attacks. And their orders. The can't let anyone in or out of the Dera Reaches without a pass. Something about the desert dwellers going mad._";

begintalknode 35;
	state = 32;
	nextstate = 33;
	condition = 1;
	question = "Mad how?";
	text1 = "_Well, mad is what they say. I think mad might be a strong word. I just hear rumors._";

begintalknode 36;
	state = 33;
	nextstate = 30;
	condition = 1;
	question = "Tell me one.";
	text1 = "_I've just heard that they've started to fear all creations down there. Taking the Shaper desire to control creations and going even farther. Putting all the creations in camps, and ... worse._";
	text2 = "_I don't want to talk about it anymore. I care for creations. That's my life. The thought of what they might be doing down there makes me sick._";

begintalknode 37;
	state = 30;
	nextstate = 34;
	condition = 1;
	question = "You are the creation Keeper?";
	text1 = "_That's right. Some creations are too unpredictable or difficult or smelly to keep inside the city. So they're stored in the stables to the west, and I look after them._";
	text2 = "_It's been nothing but trouble lately, though. I've had real problems._";
	text3 = "_Nothing to do now, though, now that you wiped out all my creations. I know you had to defend yourself, but I wish there'd been a better way._";
	code =
		rs(2); rs(3);
		if (gf(62,3) < 2)
			as(2);
		if (gf(62,3) == 2)
			as(3);
	break;
	
begintalknode 38;
	state = 34;
	nextstate = -1;
	condition = gf(41,18) > 0;
	question = "Do you know Warzana? The Keeper in the city?";
	text1 = "_That lazy thug? I don't know what fool thought he should be allowed to look after creations. It's the war. Everything is sloppy now._";

begintalknode 39;
	state = 34;
	nextstate = 35;
	condition = gf(62,3) < 2;
	question = "Any way I can help?";
	text1 = "He looks you over. _You seem to know your way around creations. I'll tell you something. The creations in the stable now? They're getting dangerous. I feel like I'm taking my life in my hands when I go over there._";
	text2 = "_There's a beta there. It's ... It seems too smart for its own good. I need someone to bring it under control again. I think, if it calms down, the other creations will fall in line._";
	code = 
		set_flag(62,3,1);
		toggle_quest(89,1);
	break;
	
begintalknode 40;
	state = 34;
	nextstate = 30;
	condition = 1;
	question = "I'd like to know something else.";
	text1 = "_Sure. Anything to keep my mind off my arm._";

begintalknode 41;
	state = 35;
	nextstate = -1;
	condition = 1;
	question = "Calm it down, how?";
	text1 = "_I don't know. I don't know anything about Shaping. With words or magic or your mind._";

begintalknode 42;
	state = 30;
	nextstate = -1;
	condition = gf(62,3) == 1 && gf(62,4) == 1;
	question = "I managed to calm that beta down. The stables should be safer now.";
	text1 = "_I am grateful to you. I was afraid that all of those creations would have to be destroyed. They had done nothing to earn that._";
	text2 = "_You deserve pay for your help. There's a dock to the south. Mostly abandoned. I have a copy of the key to the storehouse there. I'll unlock it for you. Feel free to keep what you find._";
	code =
		sf(62,3,3);
		sf(62,11,1);
		toggle_quest(89,3);
		award_party_xp(200,25);
	break;
		
begintalknode 43;
	state = 30;
	nextstate = -1;
	condition = gf(62,3) == 1 && gf(62,4) == 2;
	question = "I'm afraid that some creations had to be destroyed.";
	text1 = "_That is unfortunate. Though I'm sure that it was necessary. I am sorry that all of those creations had to be destroyed. They had done nothing to deserve that._";
	text2 = "_You deserve pay for your help. There's a dock to the south. Mostly abandoned. I have a copy of the key to the storehouse there. I'll unlock it for you. Feel free to keep what you find._";
	code =
		sf(62,3,3);
		sf(62,11,1);
		toggle_quest(89,3);
		award_party_xp(200,25);
	break;

	
//

begintalknode 50;
	state = -1;
	nextstate = 50;
	condition = 1;
	question = "Ghar";
	text1 = "There is a huge battle beta lurking in the back corner of this stable. It is well-fed and dry, but it seems sullen and nervous.";
	text2 = "It stares at you boldly as you approach. When you are close, it says, _I Ghar._ ";
	text5 = "Ghar stares at the wall quietly.";
	action = INTRO;

begintalknode 51;
	state = 50;
	nextstate = -1;
	condition = gf(62,3) == 0;
	question = "Greetings, creature.";
	text1 = "It turns away from you and faces the wall. You try to speak with it, but it doesn't respond. It just stands there.";
	action = END_TALK;
	
begintalknode 52;
	state = 50;
	nextstate = -1;
	condition = gf(62,3) > 0 && gf(62,4) == 0;
	question = "I need to talk to you.";
	text1 = "It turns away from you and faces the wall.";
	
begintalknode 53;
	state = 50;
	nextstate = 51;
	condition = gf(62,3) > 0 && get_stat(20) > 3 && gf(62,4) == 0;
	question = "Quirce is concerned about you. You seem to be stirring up the other creations.";
	text1 = "Ghar tenses up. Your authoritative tone gets its attention. It turns to you. _Ghar left here. Ghar cold. Ignored. For long time. Ghar hate this place._";
	text2 = "You can see strong flickers of independence in Ghar's eyes. A full Shaper would probably destroy this creature. However, it is a fairly simple creation. If you exercised your will, you might be able to pacify it.";
	text3 = "Or you might enrage it further.";
	
begintalknode 54;
	state = 50;
	nextstate = -1;
	condition = gf(62,3) > 0 && gf(62,4) == 0;
	question = "I want to know something.";
	text1 = "Ghar stares at the ground sullenly. It pretends to ignore you.";
	
begintalknode 55;
	state = 50;
	nextstate = -1;
	condition = gf(62,3) > 0 && gf(62,4) == 0;
	question = "I think that you are going rogue. Best to be safe. (Attack.)";
	text1 = "Ghar isn't surprised by this. It turns and roars. Then you find, very quickly, that this creature has some influence over the other creations in these pens ...";
	action = END_TALK;
	code = 
		set_attitude(1001,10);
		set_act_at_dist(1001,1);
	break;
	
begintalknode 56;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "Goodbye.";
	text1 = "You leave. Ghar gives no sign of noticing your departure.";
	action = END_TALK;

begintalknode 57;
	state = 51;
	nextstate = -1;
	condition = get_stat(20) < 8;
	question = "(Attempt to control Ghar.)";
	text1 = "Without moving a muscle, you extend your will, trying to establish the mental link between Shapers or Lifecrafters and their creations.";
	text2 = "Alas, Ghar immediately realizes what you are doing, and your will is too weak to ensnare this furious creature.";
	text3 = "Ghar isn't surprised by this. It lets out a deafening roar. Then you find, very quickly, that this creature has some influence over the other creations in these pens ...";
	code = 
		set_attitude(1001,10);
		set_act_at_dist(1001,1);
	break;
	
begintalknode 58;
	state = 51;
	nextstate = -1;
	condition = get_stat(20) >= 8;
	question = "(Attempt to control Ghar.)";
	text1 = "Without moving a muscle, you extend your will, trying to establish the mental link between Shapers or Lifecrafters and their creations.";
	text2 = "Ghar immediately realizes what you are doing, and your will is too strong for it. You fill the beta with soothing thoughts. Its mind is too simple to concentrate on more than one or two things. You replace the rebellious thoughts.";
	text3 = "Soon, it is standing quietly at attention. You leave it alone. At least now the Shapers won't kill it.";
	action = END_TALK;
	code =
		award_party_xp(100,25);
		sf(62,4,1);
	break;

begintalknode 59;
	state = 51;
	nextstate = -1;
	condition = 1;
	question = "You are a rogue. You must be removed. (Attack.)";
	text1 = "Ghar isn't surprised by this. It turns and roars. Then you find, very quickly, that this creature has some influence over the other creations in these pens ...";
	action = END_TALK;
	code = 
		set_attitude(1001,10);
		set_act_at_dist(1001,1);
	break;

begintalknode 61;
	state = 50;
	nextstate = -1;
	condition = gf(62,4) == 1;
	question = "How are you doing, Ghar?";
	text1 = "Ghar nods contentedly. It is calm. For now. A few more weeks of neglect, and it will be right back where it started. You leave it alone.";
	action = END_TALK;

begintalknode 62;
	state = 51;
	nextstate = -1;
	condition = 1;
	question = "I'll be going now.";
	text1 = "You leave. Ghar turns back to the wall and seethes.";
	action = END_TALK;


//


begintalknode 70;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "One of the guards on this road stops you. _Halt!_ he shouts. _All on this path must have a pass from Stormhold. Show yours! Now!_";
	text2 = "You try to show him the papers you got from Rawal, but he doesn't even look closely. _None of your trickery! Spy!_ He shouts an alarm, which is soon picked up by other guards in the orchards.";
	text3 = "This isn't good. Maybe if you can escape quickly enough, you can escape the permanent wrath of Perikalia.";
	
begintalknode 71;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "One of the guards on this road stops you. _Halt!_ he shouts. _All on this path must have a pass from Stormhold. Show yours! Now!_";
	text2 = "You show the pass you got from Alwan. He looks at it and nods. _Haven't seen one of those in a while. Looks real enough. You can pass._";
	
begintalknode 72;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The guards on this plot are a particularly nervous and hostile lot. Something about being this close to the Dera Reaches must lead to paranoia. You barely merit a nod before they walk by.";

begintalknode 73;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "As you travel down the road, you see something ominous to the south. Several columns of smoke rising into the sky, not far beyond the orchards. You move more quickly, trying to see the source of the disruption.";
	text2 = "You identify the problem the same time the guards do. Several packs of rogues rush out of the thick underbrush, rushing toward Perikalia. The guards shout, _Attackers! Stop them!_";
	code =
		sf(62,14,1);
		activate_hidden_group(1);
	break;
	
begintalknode 74;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "__";

begintalknode 75;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "__";

//

begintalknode 90;
	state = -1;
	nextstate = 90;
	condition = 1;
	question = "Name";
	text1 = "There is an armed warrior walking on the road to the north. He lacks any sort of military insignia. He appears to have just returned from a tiring journey through the desert to the south.";
	text2 = "When you get close to him, he stops and raises the visor of his helmet. He recognizes you. _You ... Yes. I am Gusta. I was told to watch for you. And here you are._";

begintalknode 91;
	state = 90;
	nextstate = -1;
	condition = 1;
	question = "You know who I am?";
	text1 = "_I received a message about you. Recently. The description seems accurate enough._";

	
begintalknode 92;
	state = 90;
	nextstate = 91;
	condition = 1;
	question = "And who told you to watch me?";
	text1 = "_Our common master. Rawal. He has heard from you very little recently. I am to give you a message._";
	
begintalknode 93;
	state = 91;
	nextstate = 92;
	condition = 1;
	question = "And that is?";
	text1 = "_That he commands you. And he is not the only one who can twist the command tool against you. Remember that he has work for you. If you do not, he will bring you to heel._";
	
begintalknode 94;
	state = 92;
	nextstate = -1;
	condition = 1;
	question = "What do you do for Rawal?";
	text1 = "_Whatever he says. His command over me is as absolute as it is over you._";
	text2 = "_I had work to do in the Dera Reaches. I cannot get in. Perhaps you will have better luck. You may have better papers than I do._";
	
begintalknode 95;
	state = 92;
	nextstate = -1;
	condition = gf(100,8) > 0;
	question = "I am Rawal's servant no longer. My control tool has been removed.";
	text1 = "He looks very disappointed. _This is what I feared. I am sorry to hear it. I have my own orders, if that is the case. Orders I must obey. Now my time, I think, will come to an end._";
	text2 = "He draws his blade.";
	action = END_TALK;
	code =
		set_attitude(60,10);
	break;
	
begintalknode 96;
	state = 92;
	nextstate = -1;
	condition = gf(100,8) > 0;
	question = "I have not forgotten my duty to Rawal. I will obey his commands. (Lie.)";
	text1 = "_I will make sure that he hears of it. If not, his agents are everywhere. As I have learned, painfully._";
	text2 = "He nods to you and walks off.";
	action = END_TALK;
	
begintalknode 97;
	state = 92;
	nextstate = -1;
	condition = gf(100,8) == 0;
	question = "I am Rawal's servant no longer. I will do whatever it takes to remove this control tool.";
	text1 = "He looks very disappointed. _This is what I feared. I am sorry to hear it. I have my own orders, if that is the case. Orders I must obey. Now my time, I think, will come to an end._";
	text2 = "He draws his blade.";
	action = END_TALK;
	code =
		set_attitude(60,10);
	break;
	
begintalknode 98;
	state = 92;
	nextstate = -1;
	condition = gf(100,8) == 0;
	question = "I have not forgotten my duty to Rawal. I will obey his commands.";
	text1 = "_I will make sure that he hears of it. If not, his agents are everywhere. As I have learned, painfully._";
	text2 = "He nods to you and walks off.";
	action = END_TALK;